The IDE (Integrated Development Environment) forms the main user interface of the Crimson Development System.
The main form is split into 3 areas :
Common Code
Common Code refers to the program modules which are common to all (or some) of the Forms within the application. One program module must always be present in the Common Code section, namely, Initial.
The Initial module is invoked when the application is started and is intended to perform any processing required to initialise the application such as creating menus and displaying the first Form.
The Initial module should not contain any Functions or Procedures, nor should it contain an End statement, as the automatic processing of events starts when the program falls off the end of the Initial module.
Double Clicking a Common Code entry will invoke the text editor.
Form
The Form area contains a list of all Forms used in the application. Clicking on a Form entry will reveal all Form Code modules (see below) associated with that form. Double Clicking an entry will invoke the Form editor.
Form Code
For clarity, application code may be split into Common code (see above) and Form code. Form code is program code that is specifically associated with a particular Form.
When programming Form code, it is not necessary to code the name of the Form when getting or setting properties, calling methods or processing events for that Form. For example, when processing the Click event for Button1 on the associated Form it is not necessary to include the Form name, i.e.
Procedure Button1.Click()
Button1.Enabled=True
will suffice.
Menus
Most IDE operations can be performed either by Clicking, Double clicking or pressing buttons, but all these functions and some additional ones are available as menu options.
File menu
Open Project
Opens an existing Project.
Close Project
Closes the currently open Project.
New project
Opens a new Project and creates a Project file on disk.
Save
The Save option is only available when using the Text Editor. The contents of the program module are saved to disk and editing continues. The program module is automatically saved when the Text Edit window is closed.
Quit
The Quit option quits the IDE. All outstanding work is saved to disk.
Edit menu
The Edit menu is only available whilst using the text Editor.
Cut
Cuts the selected text from the document.
Copy
Copies the selected text from the document.
Paste
Pastes the text in the Clipboard into the document at the current cursor position.
Form menu
New Form
Opens the Form Editor with a blank form.
Edit Form
Edits the form which is highlighted in the Form List Box area.
Delete Form
Deletes the form and associated Form code entries from the Project. Confirmation is requested before this operation is carried out.
Code menu
New Module
Creates a new program module. If a form is selected in the Form List Box area then a new Form Code module will be created, otherwise a Common Code module will be created. The Text Editor is invoked.
Edit Module
Invokes the Text Editor for the selected program module. The program module may be selected in either the Common Code or Form Code areas.
Remove Module
Removes a program module from the Project. The file containing the source code on disk is not removed.
Mark Changed
The IDE automatically marks modules as having been changed whenever the internal Text Editor is used on a module. Should you wish to use an external editor, the Mark Changed option will inform the IDE that the module requires re-compilation.
Compile
All modules requiring compilation will be automatically compiled when the Build Application option is chosen, however, Build Application does not produce an Error Listing on disk when errors occur.
The Compile option can be used to produce an Error Listing for a particular module
or may be used as a syntax check following changes made to a module.
Application menu
Build Application
The Build Application option compiles all program modules which require compilation and builds an object code file on disk.
Upon a successful build, the application is run by double clicking on its Icon.
The Inbuilt Editor
The Inbuilt Editor is provided to ease program development by removing the need to
switch between the IDE application and a separate text editor.
Multiple Text Editor windows may be opened simultaneously (up to 8) and text may be Cut, Copied and Pasted between windows (and indeed any other application).
The size of the text is limited to 32K (limited by the Macintosh text editing routines) but multiple modules can be used to limit this problem.
The Form Designer
The Form Designer allows the application developer to quickly and easily design GUI Forms for use within their application. The names assigned to Forms and Controls can be used directly within a program module to manipulate the properties, call methods and process events associated with a control.
To the left of the design window lies the Tool Bar which contains an arrow symbol, which is used to point and select controls and icons representing the controls themselves.
Clicking on a control icon in the Tool Bar makes it active, and once active, clicking on the design window drops an instance of that control onto the window.
Clicking on any control within the design window makes that control active and by dragging that control it can be moved around.
When active, a control displays a small size box in its bottom right corner. By dragging this size box the control can be re-sized.
Double clicking on any control (including the design window) will display its default properties for editing.
The design window itself can be moved and re-sized using the windows Title bar and Size bar respectively. Once positioned and sized on the screen, this size and position will reflect the eventual default size and position for the Form when it is displayed using the OpenWindow method.